<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ page import="com.zuikaku.pojo.User" %><%--
  Created by IntelliJ IDEA.
  User: Zuikaku
  Date: 2022/3/6
  Time: 14:29
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>主页</title>
</head>
<body>

当前用户：${sessionScope.activeUser.nickname}
<c:if test="${sessionScope.activeUser.vip==1}">
    <span style="color: red">超级会员</span>
</c:if>
<c:if test="${sessionScope.activeUser.vip==0}">
    <span >普通会员</span>
</c:if>

<h3>通知：${applicationScope.notice}</h3>
<hr>
<h5>我的订单</h5>
<table>
<thead>
    <tr>
        <th>订单ID</th>
        <th>名称</th>
        <th>状态</th>
        <th>价格</th>
        <th>创建时间</th>
    </tr>
</thead>
<tbody>
<c:forEach items="${requestScope.orderList}" var="temp">
    <tr>
        <td>${temp.orderId}</td>
        <td>${temp.orderName}</td>
        <td>
            <c:if test="${temp.orderStatus==0}">
            <span style="color: orange">待支付</span>
            </c:if>
            <c:if test="${temp.orderStatus==1}">
            <span style="color: green">已支付</span>
            </c:if>
            <c:if test="${temp.orderStatus==2}">
            <span style="color: red">已超时</span>
            </c:if>
        </td>
        <td>${temp.orderPrice}</td>
        <td>
            <fmt:formatDate value="${temp.createDate}" pattern="yyyy-MM-dd HH:mm:ss"/>
        </td>
    </tr>
</c:forEach>
</tbody>
</table>
<hr>

<c:forEach begin="1" end="6" var="num">
    <span>${num}</span>
</c:forEach>

</body>
</html>
